﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
namespace INTEX.DataBase.Tools
{
    public partial class INTEXDBC
    {
        public DataRow Convert2GGBST(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGGBST(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                default:
                dwReturn["GGMANDANT"]="00";
                dwReturn["GGSA"]="00";
                dwReturn["GGART"]="40021.NE.20.1       ";
                dwReturn["GGVAR"]="   ";
                dwReturn["GGFARBE"]="Y4042-1   ";
                dwReturn["GGZENSUR"]="1";
                dwReturn["GGLO"]="01";
                dwReturn["GGMJJ"]="2014";
                dwReturn["GGMM"]="10";
                dwReturn["GGAKTKZ"]="A";
                dwReturn["GGME01"]="0";
                dwReturn["GGME10"]="0";
                dwReturn["GGME11"]="0";
                dwReturn["GGME12"]="0";
                dwReturn["GGME13"]="0";
                dwReturn["GGME20"]="0";
                dwReturn["GGME21"]="0";
                dwReturn["GGME26"]="0";
                dwReturn["GGME27"]="0";
                dwReturn["GGME30"]="0";
                dwReturn["GGME31"]="0";
                dwReturn["GGME32"]="0";
                dwReturn["GGME33"]="0";
                dwReturn["GGME34"]="0";
                dwReturn["GGME35"]="0";
                dwReturn["GGME36"]="0";
                dwReturn["GGME37"]="0";
                dwReturn["GGME38"]="0";
                dwReturn["GGME40"]="0";
                dwReturn["GGME41"]="0";
                dwReturn["GGME42"]="0";
                dwReturn["GGME43"]="1200";
                dwReturn["GGME46"]="0";
                dwReturn["GGME47"]="0";
                dwReturn["GGME50"]="0";
                dwReturn["GGME51"]="0";
                dwReturn["GGME52"]="0";
                dwReturn["GGME53"]="0";
                dwReturn["GGME55"]="0";
                dwReturn["GGME56"]="0";
                dwReturn["GGME57"]="0";
                dwReturn["GGME58"]="0";
                dwReturn["GGME73"]="0";
                dwReturn["GGME76"]="0";
                dwReturn["GGME77"]="0";
                dwReturn["GGME78"]="0";
                dwReturn["GGME80"]="0";
                dwReturn["GGME88"]="0";
                dwReturn["GGME89"]="0";
                dwReturn["GGME90"]="0";
                dwReturn["GGME91"]="0";
                dwReturn["GGME92"]="0";
                dwReturn["GGME93"]="0";
                dwReturn["GGMER03"]="0";
                dwReturn["GGMER04"]="0";
                dwReturn["GGMER05"]="0";
                dwReturn["GGMER06"]="0";
                dwReturn["GGMER07"]="0";
                dwReturn["GGBSTA"]="1200";
                dwReturn["GGBSTAN"]="0";
                dwReturn["GGBSTKEN"]="0";
                dwReturn["GGBSTKZU"]="0";
                dwReturn["GGBSTKMA"]="0";
                dwReturn["GGBSTKME"]="0";
                dwReturn["GGBSTMA"]="0";
                dwReturn["GGBSTME"]="1200";
                dwReturn["GGBSTVMA"]="0";
                dwReturn["GGBSTVME"]="1200";
                dwReturn["GGMEIV"]="0";
                dwReturn["GGINDAT"]="0";
                dwReturn["GGINBST"]="0";
                dwReturn["GGINALT"]="0";
                dwReturn["GGEKPRMA"]="0";
                dwReturn["GGEKPRME"]="0";
                dwReturn["GGEKPRZU"]="0";
                dwReturn["GGVRPR"]="0";
                dwReturn["GGDLABST"]="426";
                dwReturn["GGDLATAG"]="21";
                dwReturn["GGMINBST"]="1200";
                dwReturn["GGMAXBST"]="1200";
                dwReturn["GGFERTKZ"]="E";
                dwReturn["GGUEBER"]="N";
                dwReturn["GGFILLER1"]="                                                   ";
                dwReturn["GGAENDZL"]="0";
                dwReturn["GGAENDBEN"]="        ";
                dwReturn["GGAENDDAT"]="0";
                dwReturn["GGNEUBEN"]="KONGCH  ";
                dwReturn["GGNEUDAT"]="20141021";
                break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void SaveGGBST(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGGBST(dwData, 1);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapGGBST(ref dwLocal, dwData);
            switch (ITXDBVERSION)
            {
                case "YGR":
                default:
                    if (!flgExist)
                    {
                        InsertGGBST(dwLocal, 1);
                        UpdateGGBST(dwLocal, 1);
                    }
                    else
                    {
                        UpdateGGBST(dwLocal, 1);
                    }
                    
                    break;
            }
        }
        public void MapGGBST(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void InsertGGBST(DataRow dwData, int option = 1)
        {

            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "INSERT INTO GGBST(GGMANDANT, GGSA, GGART, GGVAR, GGFARBE, GGZENSUR, GGLO, GGMJJ, GGMM, GGAKTKZ, GGME01, GGME10, GGME11, GGME12, GGME13, GGME20, GGME21, GGME26, GGME27, GGME30, GGME31, GGME32, GGME33, GGME34, GGME35, GGME36, GGME37, GGME38, GGME40, GGME41, GGME42, GGME43, GGME46, GGME47, GGME50, GGME51, GGME52, GGME53, GGME55, GGME56, GGME57, GGME58, GGME73, GGME76, GGME77, GGME78, GGME80, GGME88, GGME89, GGME90, GGME91, GGME92, GGME93, GGMER03, GGMER04, GGMER05, GGMER06, GGMER07, GGBSTA, GGBSTAN, GGBSTKEN, GGBSTKZU, GGBSTKMA, GGBSTKME, GGBSTMA, GGBSTME, GGBSTVMA, GGBSTVME, GGMEIV, GGINDAT, GGINBST, GGINALT, GGEKPRMA, GGEKPRME, GGEKPRZU, GGVRPR, GGDLABST, GGDLATAG, GGMINBST, GGMAXBST, GGFERTKZ, GGUEBER, GGFILLER1, GGAENDZL, GGAENDBEN, GGAENDDAT, GGNEUBEN, GGNEUDAT)"
                    + " VALUES (:GGMANDANT,:GGSA,:GGART, :GGVAR, :GGFARBE, :GGZENSUR, :GGLO, :GGMJJ, :GGMM, 'A', 0, 0, 0, 0, 0, 3055, 3055, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2155, 0, 0, 0, 0, 0, 2100, 2155, 2100, 2155, 0, 0, 0, 0, 0, 0, 0, 0, 2136, '12', 900, 2162, 'E', 'N', '                                                   ', 0, 'INTEXE  ', 20150112, 'INTEXE  ', 20150112)";
                      or1.Parameters.Add("GGMANDANT", OracleType.NVarChar).Value = dwData["GGMANDANT"].ToString();
                    or1.Parameters.Add("GGSA", OracleType.NVarChar).Value = dwData["GGSA"].ToString();
                    or1.Parameters.Add("GGART", OracleType.NVarChar).Value = dwData["GGART"].ToString();
                    or1.Parameters.Add("GGVAR", OracleType.NVarChar).Value = dwData["GGVAR"].ToString();
                    or1.Parameters.Add("GGFARBE", OracleType.NVarChar).Value = dwData["GGFARBE"].ToString();
                    or1.Parameters.Add("GGZENSUR", OracleType.NVarChar).Value = dwData["GGZENSUR"].ToString();
                    or1.Parameters.Add("GGLO", OracleType.NVarChar).Value = dwData["GGLO"].ToString();
                    or1.Parameters.Add("GGMJJ", OracleType.NVarChar).Value = dwData["GGMJJ"].ToString();
                    or1.Parameters.Add("GGMM", OracleType.NVarChar).Value = dwData["GGMM"].ToString();
                    break;
                default:
                    break;
            }

            Connect2Proxy(or1);
        }
        public DataSet QueryGGBST(DataRow dwData, int option = 1)
        {
            DataSet setReturn = new DataSet();
            DataSet Result = new DataSet();
            DataTable tbLocal = null;
            OracleCommand or1;
            // GSCMANDANT GSCART GSCVAR GSCFARBE


            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM GGBST WHERE  ROWNUM<2 ";
                    break;
                case 1:
                    //GGMANDANT, GGSA, GGART, GGVAR, GGFARBE, GGZENSUR, GGLO, GGMJJ, GGMM
                    or1.CommandText = "SELECT * FROM GGBST "
                    +" WHERE GGMANDANT=:GGMANDANT AND GGSA=:GGSA AND GGART=:GGART AND GGVAR=:GGVAR AND GGFARBE=:GGFARBE  AND GGLO=:GGLO AND GGMJJ=:GGMJJ AND GGMM=:GGMM";
                    or1.Parameters.Add("GGMANDANT", OracleType.NVarChar).Value = dwData["GGMANDANT"].ToString();
                    or1.Parameters.Add("GGSA", OracleType.NVarChar).Value = dwData["GGSA"].ToString();
                    or1.Parameters.Add("GGART", OracleType.NVarChar).Value = dwData["GGART"].ToString();
                    or1.Parameters.Add("GGVAR", OracleType.NVarChar).Value = dwData["GGVAR"].ToString();
                    or1.Parameters.Add("GGFARBE", OracleType.NVarChar).Value = dwData["GGFARBE"].ToString();
                    or1.Parameters.Add("GGLO", OracleType.NVarChar).Value = dwData["GGLO"].ToString();
                    or1.Parameters.Add("GGMJJ", OracleType.NVarChar).Value = dwData["GGMJJ"].ToString();
                    or1.Parameters.Add("GGMM", OracleType.NVarChar).Value = dwData["GGMM"].ToString();
                    break; 
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
            {
                tbLocal = Result.Tables[0];
                tbLocal.TableName = "GGBST";
            }
            setReturn.Merge(Result);
            return setReturn;
        }
        public void UpdateGGBST(DataRow dwData, int option = 1)
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "UPDATE GGBST SET "
                    +"GGMANDANT=:GGMANDANT,"
                    +"GGSA=:GGSA,"
                    +"GGART=:GGART,"
                    +"GGVAR=:GGVAR,"
                    +"GGFARBE=:GGFARBE,"
                    +"GGZENSUR=:GGZENSUR,"
                    +"GGLO=:GGLO,"
                    +"GGMJJ=:GGMJJ,"
                    +"GGMM=:GGMM,"
                    +"GGAKTKZ=:GGAKTKZ,"
                    +"GGME01=:GGME01,"
                    +"GGME10=:GGME10,"
                    +"GGME11=:GGME11,"
                    +"GGME12=:GGME12,"
                    +"GGME13=:GGME13,"
                    +"GGME20=:GGME20,"
                    +"GGME21=:GGME21,"
                    +"GGME26=:GGME26,"
                    +"GGME27=:GGME27,"
                    +"GGME30=:GGME30,"
                    +"GGME31=:GGME31,"
                    +"GGME32=:GGME32,"
                    +"GGME33=:GGME33,"
                    +"GGME34=:GGME34,"
                    +"GGME35=:GGME35,"
                    +"GGME36=:GGME36,"
                    +"GGME37=:GGME37,"
                    +"GGME38=:GGME38,"
                    +"GGME40=:GGME40,"
                    +"GGME41=:GGME41,"
                    +"GGME42=:GGME42,"
                    +"GGME43=:GGME43,"
                    +"GGME46=:GGME46,"
                    +"GGME47=:GGME47,"
                    +"GGME50=:GGME50,"
                    +"GGME51=:GGME51,"
                    +"GGME52=:GGME52,"
                    +"GGME53=:GGME53,"
                    +"GGME55=:GGME55,"
                    +"GGME56=:GGME56,"
                    +"GGME57=:GGME57,"
                    +"GGME58=:GGME58,"
                    +"GGME73=:GGME73,"
                    +"GGME76=:GGME76,"
                    +"GGME77=:GGME77,"
                    +"GGME78=:GGME78,"
                    +"GGME80=:GGME80,"
                    +"GGME88=:GGME88,"
                    +"GGME89=:GGME89,"
                    +"GGME90=:GGME90,"
                    +"GGME91=:GGME91,"
                    +"GGME92=:GGME92,"
                    +"GGME93=:GGME93,"
                    +"GGMER03=:GGMER03,"
                    +"GGMER04=:GGMER04,"
                    +"GGMER05=:GGMER05,"
                    +"GGMER06=:GGMER06,"
                    +"GGMER07=:GGMER07,"
                    +"GGBSTA=:GGBSTA,"
                    +"GGBSTAN=:GGBSTAN,"
                    +"GGBSTKEN=:GGBSTKEN,"
                    +"GGBSTKZU=:GGBSTKZU,"
                    +"GGBSTKMA=:GGBSTKMA,"
                    +"GGBSTKME=:GGBSTKME,"
                    +"GGBSTMA=:GGBSTMA,"
                    +"GGBSTME=:GGBSTME,"
                    +"GGBSTVMA=:GGBSTVMA,"
                    +"GGBSTVME=:GGBSTVME,"
                    +"GGMEIV=:GGMEIV,"
                    +"GGINDAT=:GGINDAT,"
                    +"GGINBST=:GGINBST,"
                    +"GGINALT=:GGINALT,"
                    +"GGEKPRMA=:GGEKPRMA,"
                    +"GGEKPRME=:GGEKPRME,"
                    +"GGEKPRZU=:GGEKPRZU,"
                    +"GGVRPR=:GGVRPR,"
                    +"GGDLABST=:GGDLABST,"
                    +"GGDLATAG=:GGDLATAG,"
                    +"GGMINBST=:GGMINBST,"
                    +"GGMAXBST=:GGMAXBST,"
                    +"GGFERTKZ=:GGFERTKZ,"
                    +"GGUEBER=:GGUEBER,"
                    +"GGFILLER1=:GGFILLER1,"
                    +"GGAENDZL=:GGAENDZL,"
                    +"GGAENDBEN=:GGAENDBEN,"
                    +"GGAENDDAT=:GGAENDDAT,"
                    +"GGNEUBEN=:GGNEUBEN,"
                    +"GGNEUDAT=:GGNEUDAT "                
                 + " WHERE GGMANDANT=:GGMANDANT AND GGSA=:GGSA AND GGART=:GGART AND GGVAR=:GGVAR AND GGFARBE=:GGFARBE  AND GGLO=:GGLO AND GGMJJ=:GGMJJ AND GGMM=:GGMM";                
                 or1.Parameters.Add("GGMANDANT", OracleType.NVarChar).Value = dwData["GGMANDANT"].ToString();
                 or1.Parameters.Add("GGSA", OracleType.NVarChar).Value = dwData["GGSA"].ToString();
                 or1.Parameters.Add("GGART", OracleType.NVarChar).Value = dwData["GGART"].ToString();
                 or1.Parameters.Add("GGVAR", OracleType.NVarChar).Value = dwData["GGVAR"].ToString();
                 or1.Parameters.Add("GGFARBE", OracleType.NVarChar).Value = dwData["GGFARBE"].ToString();
                 or1.Parameters.Add("GGZENSUR", OracleType.NVarChar).Value = dwData["GGZENSUR"].ToString();
                 or1.Parameters.Add("GGLO", OracleType.NVarChar).Value = dwData["GGLO"].ToString();
                 or1.Parameters.Add("GGMJJ", OracleType.NVarChar).Value = dwData["GGMJJ"].ToString();
                 or1.Parameters.Add("GGMM", OracleType.NVarChar).Value = dwData["GGMM"].ToString();
                 or1.Parameters.Add("GGAKTKZ", OracleType.NVarChar).Value = dwData["GGAKTKZ"].ToString();
                 or1.Parameters.Add("GGME01", OracleType.NVarChar).Value = dwData["GGME01"].ToString();
                 or1.Parameters.Add("GGME10", OracleType.NVarChar).Value = dwData["GGME10"].ToString();
                 or1.Parameters.Add("GGME11", OracleType.NVarChar).Value = dwData["GGME11"].ToString();
                 or1.Parameters.Add("GGME12", OracleType.NVarChar).Value = dwData["GGME12"].ToString();
                 or1.Parameters.Add("GGME13", OracleType.NVarChar).Value = dwData["GGME13"].ToString();
                 or1.Parameters.Add("GGME20", OracleType.NVarChar).Value = dwData["GGME20"].ToString();
                 or1.Parameters.Add("GGME21", OracleType.NVarChar).Value = dwData["GGME21"].ToString();
                 or1.Parameters.Add("GGME26", OracleType.NVarChar).Value = dwData["GGME26"].ToString();
                 or1.Parameters.Add("GGME27", OracleType.NVarChar).Value = dwData["GGME27"].ToString();
                 or1.Parameters.Add("GGME30", OracleType.NVarChar).Value = dwData["GGME30"].ToString();
                 or1.Parameters.Add("GGME31", OracleType.NVarChar).Value = dwData["GGME31"].ToString();
                 or1.Parameters.Add("GGME32", OracleType.NVarChar).Value = dwData["GGME32"].ToString();
                 or1.Parameters.Add("GGME33", OracleType.NVarChar).Value = dwData["GGME33"].ToString();
                 or1.Parameters.Add("GGME34", OracleType.NVarChar).Value = dwData["GGME34"].ToString();
                 or1.Parameters.Add("GGME35", OracleType.NVarChar).Value = dwData["GGME35"].ToString();
                 or1.Parameters.Add("GGME36", OracleType.NVarChar).Value = dwData["GGME36"].ToString();
                 or1.Parameters.Add("GGME37", OracleType.NVarChar).Value = dwData["GGME37"].ToString();
                 or1.Parameters.Add("GGME38", OracleType.NVarChar).Value = dwData["GGME38"].ToString();
                 or1.Parameters.Add("GGME40", OracleType.NVarChar).Value = dwData["GGME40"].ToString();
                 or1.Parameters.Add("GGME41", OracleType.NVarChar).Value = dwData["GGME41"].ToString();
                 or1.Parameters.Add("GGME42", OracleType.NVarChar).Value = dwData["GGME42"].ToString();
                 or1.Parameters.Add("GGME43", OracleType.NVarChar).Value = dwData["GGME43"].ToString();
                 or1.Parameters.Add("GGME46", OracleType.NVarChar).Value = dwData["GGME46"].ToString();
                 or1.Parameters.Add("GGME47", OracleType.NVarChar).Value = dwData["GGME47"].ToString();
                 or1.Parameters.Add("GGME50", OracleType.NVarChar).Value = dwData["GGME50"].ToString();
                 or1.Parameters.Add("GGME51", OracleType.NVarChar).Value = dwData["GGME51"].ToString();
                 or1.Parameters.Add("GGME52", OracleType.NVarChar).Value = dwData["GGME52"].ToString();
                 or1.Parameters.Add("GGME53", OracleType.NVarChar).Value = dwData["GGME53"].ToString();
                 or1.Parameters.Add("GGME55", OracleType.NVarChar).Value = dwData["GGME55"].ToString();
                 or1.Parameters.Add("GGME56", OracleType.NVarChar).Value = dwData["GGME56"].ToString();
                 or1.Parameters.Add("GGME57", OracleType.NVarChar).Value = dwData["GGME57"].ToString();
                 or1.Parameters.Add("GGME58", OracleType.NVarChar).Value = dwData["GGME58"].ToString();
                 or1.Parameters.Add("GGME73", OracleType.NVarChar).Value = dwData["GGME73"].ToString();
                 or1.Parameters.Add("GGME76", OracleType.NVarChar).Value = dwData["GGME76"].ToString();
                 or1.Parameters.Add("GGME77", OracleType.NVarChar).Value = dwData["GGME77"].ToString();
                 or1.Parameters.Add("GGME78", OracleType.NVarChar).Value = dwData["GGME78"].ToString();
                 or1.Parameters.Add("GGME80", OracleType.NVarChar).Value = dwData["GGME80"].ToString();
                 or1.Parameters.Add("GGME88", OracleType.NVarChar).Value = dwData["GGME88"].ToString();
                 or1.Parameters.Add("GGME89", OracleType.NVarChar).Value = dwData["GGME89"].ToString();
                 or1.Parameters.Add("GGME90", OracleType.NVarChar).Value = dwData["GGME90"].ToString();
                 or1.Parameters.Add("GGME91", OracleType.NVarChar).Value = dwData["GGME91"].ToString();
                 or1.Parameters.Add("GGME92", OracleType.NVarChar).Value = dwData["GGME92"].ToString();
                 or1.Parameters.Add("GGME93", OracleType.NVarChar).Value = dwData["GGME93"].ToString();
                 or1.Parameters.Add("GGMER03", OracleType.NVarChar).Value = dwData["GGMER03"].ToString();
                 or1.Parameters.Add("GGMER04", OracleType.NVarChar).Value = dwData["GGMER04"].ToString();
                 or1.Parameters.Add("GGMER05", OracleType.NVarChar).Value = dwData["GGMER05"].ToString();
                 or1.Parameters.Add("GGMER06", OracleType.NVarChar).Value = dwData["GGMER06"].ToString();
                 or1.Parameters.Add("GGMER07", OracleType.NVarChar).Value = dwData["GGMER07"].ToString();
                 or1.Parameters.Add("GGBSTA", OracleType.NVarChar).Value = dwData["GGBSTA"].ToString();
                 or1.Parameters.Add("GGBSTAN", OracleType.NVarChar).Value = dwData["GGBSTAN"].ToString();
                 or1.Parameters.Add("GGBSTKEN", OracleType.NVarChar).Value = dwData["GGBSTKEN"].ToString();
                 or1.Parameters.Add("GGBSTKZU", OracleType.NVarChar).Value = dwData["GGBSTKZU"].ToString();
                 or1.Parameters.Add("GGBSTKMA", OracleType.NVarChar).Value = dwData["GGBSTKMA"].ToString();
                 or1.Parameters.Add("GGBSTKME", OracleType.NVarChar).Value = dwData["GGBSTKME"].ToString();
                 or1.Parameters.Add("GGBSTMA", OracleType.NVarChar).Value = dwData["GGBSTMA"].ToString();
                 or1.Parameters.Add("GGBSTME", OracleType.NVarChar).Value = dwData["GGBSTME"].ToString();
                 or1.Parameters.Add("GGBSTVMA", OracleType.NVarChar).Value = dwData["GGBSTVMA"].ToString();
                 or1.Parameters.Add("GGBSTVME", OracleType.NVarChar).Value = dwData["GGBSTVME"].ToString();
                 or1.Parameters.Add("GGMEIV", OracleType.NVarChar).Value = dwData["GGMEIV"].ToString();
                 or1.Parameters.Add("GGINDAT", OracleType.NVarChar).Value = dwData["GGINDAT"].ToString();
                 or1.Parameters.Add("GGINBST", OracleType.NVarChar).Value = dwData["GGINBST"].ToString();
                 or1.Parameters.Add("GGINALT", OracleType.NVarChar).Value = dwData["GGINALT"].ToString();
                 or1.Parameters.Add("GGEKPRMA", OracleType.NVarChar).Value = dwData["GGEKPRMA"].ToString();
                 or1.Parameters.Add("GGEKPRME", OracleType.NVarChar).Value = dwData["GGEKPRME"].ToString();
                 or1.Parameters.Add("GGEKPRZU", OracleType.NVarChar).Value = dwData["GGEKPRZU"].ToString();
                 or1.Parameters.Add("GGVRPR", OracleType.NVarChar).Value = dwData["GGVRPR"].ToString();
                 or1.Parameters.Add("GGDLABST", OracleType.NVarChar).Value = dwData["GGDLABST"].ToString();
                 or1.Parameters.Add("GGDLATAG", OracleType.NVarChar).Value = dwData["GGDLATAG"].ToString();
                 or1.Parameters.Add("GGMINBST", OracleType.NVarChar).Value = dwData["GGMINBST"].ToString();
                 or1.Parameters.Add("GGMAXBST", OracleType.NVarChar).Value = dwData["GGMAXBST"].ToString();
                 or1.Parameters.Add("GGFERTKZ", OracleType.NVarChar).Value = dwData["GGFERTKZ"].ToString();
                 or1.Parameters.Add("GGUEBER", OracleType.NVarChar).Value = dwData["GGUEBER"].ToString();
                 or1.Parameters.Add("GGFILLER1", OracleType.NVarChar).Value = dwData["GGFILLER1"].ToString();
                 or1.Parameters.Add("GGAENDZL", OracleType.NVarChar).Value = dwData["GGAENDZL"].ToString();
                 or1.Parameters.Add("GGAENDBEN", OracleType.NVarChar).Value = dwData["GGAENDBEN"].ToString();
                 or1.Parameters.Add("GGAENDDAT", OracleType.NVarChar).Value = dwData["GGAENDDAT"].ToString();
                 or1.Parameters.Add("GGNEUBEN", OracleType.NVarChar).Value = dwData["GGNEUBEN"].ToString();
                 or1.Parameters.Add("GGNEUDAT", OracleType.NVarChar).Value = dwData["GGNEUDAT"].ToString();
                    break;
                case 2:                  
                  
                    break;

            }
            Connect2Proxy(or1);
        }
    }
}
